<?php
error_reporting ( E_ALL );
define ( 'MidPHP', TRUE );
define ( 'APP_NAME', 'MidPHP' );
define ( 'APP_ROOT', substr ( dirname ( __FILE__ ), 0, - 1 ) );
define ( 'MAGIC_QUOTES_GPC', get_magic_quotes_gpc () );
define ( 'DIR_SEP', DIRECTORY_SEPARATOR );
define ( 'CHARSET', 'utf-8' );
define ( 'TIMEZONE', "Asia/Shanghai" );
define ( 'DEBUG', false );
define ( 'SUB_PATH', '/' );
define ( 'DEFAULT_MODULE', 'index' );
define ( 'DEFAULT_ACTION', 'index' );

set_magic_quotes_runtime ( 0 );
session_start ();

include_once APP_ROOT . 'i' . DIR_SEP . 'conf' . DIR_SEP . 'commen.conf.php'; //加载配置文件
include_once $config ['path'] ['config'] . 'db.conf.php'; //加载配置文件
include_once $config ['path'] ['config'] . 'load.conf.php'; //加载配置文件
include_once $config ['path'] ['config'] . 'route.conf.php'; //加载配置文件


require_once APP_ROOT . 'MidPHP' . DIR_SEP . 'initialize.inc.php'; //加载核心文件
include_once $config ['path'] ['config'] . 'global.conf.php'; //加载配置文件


Config::set ( $config );
Config::set ('custom', 'corrie' );
isset ( $autoload ) && Mid::autoload ( $autoload );
//Midp::route($route);
?>